-- GENERATED SPELL FOR [Dragonflayer Bonecrusher] --


function spell0_24069(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(59599,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24069', 20319, 1)
end

function spell1_24069(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(9791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24069', 20330, 1)
end

function spell2_24069(pUnit, Event) --@Knockdown Spin,Self--
pUnit:FullCastSpellOnTarget(43935,pUnit)
pUnit:RegisterEvent('Sorts_24069', 1000, 1)
end

function Sorts_24069(pUnit, Event)
local choix_sorts_24069 = math.random(0, 2)
if choix_sorts_24069 == 0 then
pUnit:RegisterEvent('spell0_24069', 1, 1)
end
if choix_sorts_24069 == 1 then
pUnit:RegisterEvent('spell1_24069', 1, 1)
end
if choix_sorts_24069 == 2 then
pUnit:RegisterEvent('spell2_24069', 1, 1)
end
end

function mob24069_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24069', math.random(1500, 3000), 1)
end

function mob24069_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24069_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24069_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24069, 1, 'mob24069_Action')
RegisterUnitEvent(24069, 2, 'mob24069_Leave')
RegisterUnitEvent(24069, 3, 'mob24069_Kill')
RegisterUnitEvent(24069, 4, 'mob24069_Die')
